import { ApiProperty } from '@nestjs/swagger';
import { IsInt, IsNotEmpty, IsOptional, IsString } from 'class-validator';

export class CreateKnowledgeDto {
  @ApiProperty({ description: 'HTML内容', required: true })
  @IsString()
  @IsNotEmpty()
  rawHtml: string;

  @ApiProperty({ description: '分类ID', required: false })
  @IsInt()
  categoryId: number;
}